Skip to content

Fix System Settings privacy URLs in the macOS app#261

Open
ainopara wants to merge 2 commits intotheJayTea:mainfrom
ainopara:fix/privacy-settings-links
Open

Fix System Settings privacy URLs in the macOS app#261
ainopara wants to merge 2 commits intotheJayTea:mainfrom
ainopara:fix/privacy-settings-links

Conversation

@ainopara
Copy link
Copy Markdown

@ainopara ainopara commented Apr 21, 2026

Background

This PR is specific to the macOS app under macOS/WritingTools. Other platform implementations live in separate codebases and are not affected.

The macOS app currently opens Privacy & Security settings with URLs using the x-apple.systemsettings scheme, for example:

x-apple.systemsettings:com.apple.settings.PrivacySecurity.extension?Privacy_Accessibility

On macOS 26.4 (25E246), that scheme has no registered handler, which causes macOS to show:

There is no application set to open the URL ...

This appears to be a regression introduced by switching from the old x-apple.systempreferences scheme to x-apple.systemsettings. Although Apple's settings app is now named System Settings, its bundle identifier and URL scheme still use the older System Preferences naming.

Investigation

I checked the local System Settings app metadata on macOS 26.4:

  • /System/Applications/System Settings.app has bundle identifier com.apple.systempreferences.
  • Its CFBundleURLTypes advertise x-apple.systempreferences.
  • It does not advertise x-apple.systemsettings.

I also checked Launch Services through NSWorkspace.urlForApplication(toOpen:):

  • x-apple.systemsettings:com.apple.settings.PrivacySecurity.extension?Privacy_Accessibility resolves to no handler.
  • x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?Privacy_Accessibility resolves to /System/Applications/System Settings.app.
  • x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility also resolves to /System/Applications/System Settings.app.

The Privacy & Security settings extension is still present as com.apple.settings.PrivacySecurity.extension, and its metadata includes allowsXAppleSystemPreferencesURLScheme = 1 plus legacy bundle identifier com.apple.preference.security. So the current extension identifier is valid, but it still needs to be opened through the x-apple.systempreferences scheme.

Repository history shows the current upstream x-apple.systemsettings URLs were introduced in commit 460f53f, replacing previously used x-apple.systempreferences:com.apple.preference.security... URLs.

Summary

  • Replace the unsupported x-apple.systemsettings scheme with the x-apple.systempreferences scheme that System Settings actually registers.
  • Try the current Privacy & Security extension identifier first.
  • Fall back to the legacy Security preference pane identifier.
  • Fall back to opening System Settings directly if deep linking fails.
  • Refresh onboarding permission status when the macOS app becomes active again after the user returns from System Settings.

Testing

  • Verified URL handler resolution locally on macOS 26.4 with NSWorkspace.urlForApplication(toOpen:).
  • Verified the System Settings app bundle metadata locally: bundle identifier com.apple.systempreferences; registered scheme x-apple.systempreferences.
  • Built the PR branch successfully with xcodebuild -project macOS/WritingTools.xcodeproj -scheme WritingTools -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO build.

@ainopara ainopara marked this pull request as draft April 21, 2026 06:33
@ainopara ainopara changed the title Fix macOS privacy settings links Fix macOS System Settings privacy URLs Apr 21, 2026
@ainopara ainopara marked this pull request as ready for review April 21, 2026 06:40
@ainopara ainopara changed the title Fix macOS System Settings privacy URLs Fix System Settings privacy URLs in the macOS app Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant